﻿using kunukn.RecommendationEngine.AreaRecommendation.Code.Entities;
using kunukn.RecommendationEngine.AreaRecommendation.Code.Helpers;


namespace kunukn.RecommendationEngine.AreaRecommendation.Code.Engine
{
    /// <summary>
    /// Author: Kunuk Nykjaer
    /// The tracker api track events and does CRUD operation to or from storage
    /// 
    /// </summary>
    public static class Tracker
    {
        public const string SkipMode = "SkipMode";        

        /// <summary>
        /// Track when an Item is viewed and save event data        
        /// </summary>
        /// <param name="item"></param>
        public static void TrackEvent(Item item)
        {            
            if(!SessionHelper.IsSkipNextTracking())
            {
                ItemHelper.TrackItemEvent(item);
            }                
        }
    }
}